extern int yylineno;
extern char *yytext;
void yyerror(char *s, ...);
extern int yylineno;
extern char *yytext;
void yyerror(char *s, ...);

/* node of AST */
struct ast {
  int lineno;
  char* name;
  struct ast *l;
  struct ast *r;
  union{
    char *idtype;
    int intgr;
  };
};

/* build an AST
 * @name: name of node
 * @num: number of branch
 */
struct ast *newast(char *name, int num, ...);

/* scan AST
 * @ast: pointer of abstract syntax tree
 * @level: level of the tree
 */
void eval(struct ast *a, int level);
